home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / AOCE Sample Code / PowerTalk Access Modules / Sample CSAM / Sources / SKEL•DRVR.A < prev    next >
Encoding:
Text File  |  1995-07-28  |  1.6 KB  |  71 lines  |  [TEXT/MPS ]

  1. *
  2. *    Driver interface for a DSAM.
  3. *
  4. *        Written by: Gavin Eadie • The University of Michigan Information Systems
  5. *              Phone: (313) 936-0816
  6. *         AppleLink: A67
  7. *          Internet: Gavin.Eadie@umich.edu
  8. *
  9. *        History:    Oct22/91 - Started (Gav)
  10. *                    Oct31/91 - Some cleanup .. Start to use structured macros.
  11. *                    Aug24/92 - OCE alpha 8 interface -- no Control calls.
  12. *                    Sep09/92 - remove all reference to 'dixie' -- make generic.
  13. *                    Sep11/92 - add dNeedTime for periodic time allowance ... (Gav).
  14. *                    Jan21/93 - extend periodic time to 5 seconds ... (Gav).
  15. *                    Feb07/94 - extend periodic time to 10 seconds ... (Gav).
  16.  
  17.     Case        OBJ
  18.     Print        OFF
  19.     Include     'Traps.a'
  20.     Include    'SysEqu.a'
  21.     Load        'ProgStrucMacs.d'
  22.     Load        'FlowCtlMacs.d'
  23.     Print        ON                
  24.  
  25.                 Macro
  26.                 DefinedString
  27.                 GBLC        &FILENAME
  28.                 DC.B        '.&FILENAME'
  29.                 EndM
  30.  
  31.     IMPORT    CSAM_Open,CSAM_Close,CSAM_Prime,CSAM_Control,CSAM_Status
  32.  
  33. Export    Procedure CSAM_Entry
  34.         
  35.             Begin
  36.     
  37.                 DC.B        (1<<dNeedTime) | (1<<dNeedLock) | (1<<dCtlEnable)
  38.                 DC.B        0
  39.                 DC.W        600                        ; once every 10 seconds
  40.                 DC.W        0
  41.                 DC.W        0
  42.                 DC.W        Do_Open-CSAM_Entry
  43.                 DC.W        Do_Prime-CSAM_Entry
  44.                 DC.W        Do_Control-CSAM_Entry
  45.                 DC.W        Do_Status-CSAM_Entry
  46.                 DC.W        Do_Close-CSAM_Entry
  47.  
  48.                 DefinedString                        ; brings in &defined string
  49.  
  50. Do_Open        LEA        CSAM_Open,A2
  51.                 BRA.S        CallIt
  52.  
  53. Do_Prime        LEA        CSAM_Prime,A2
  54.                 BRA.S        CallIt
  55.  
  56. Do_Control    LEA        CSAM_Control,A2
  57.                 BRA.S        CallIt
  58.  
  59. Do_Status    LEA        CSAM_Status,A2
  60.                 BRA.S        CallIt
  61.  
  62. Do_Close        LEA        CSAM_Close,A2
  63.  
  64. CallIt        MOVE.L    A1,-(A7)            
  65.                 MOVE.L    A0,-(A7)            
  66.                 JSR        (A2)                
  67.                 ADDQ.W    #$8,A7              
  68.  
  69.         Return
  70.  
  71.     End